package com.diamond.facade;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.diamond.bo.ClientOrderDetailBO;
import com.diamond.bo.QueryOrderBO;
import com.diamond.bo.ReturnBO;
import com.diamond.service.IClientorderdetailService;
import com.diamond.util.StringUtil;

public class ClientorderdetailFacade extends CommonFacade<ClientOrderDetailBO> {
	
	private IClientorderdetailService clientorderdetailService;
	
	public void setClientorderdetailService(
			IClientorderdetailService clientorderdetailService) {
		this.clientorderdetailService = clientorderdetailService;
	}

	public ReturnBO<ClientOrderDetailBO> queryClientOrderDetail(QueryOrderBO queryOrderBo) throws Exception {
		return clientorderdetailService.queryClientOrderDetail(queryOrderBo);
	}

	public Boolean updateClientOrderDetailState(String cliOrdMasterId, List list) throws Exception {
		return clientorderdetailService.updateClientOrderDetailState(cliOrdMasterId, list);
	}

	public void doInlay(HttpServletRequest request) {
		String inlayDiamondId=request.getParameter("inlayDiamondId");
	    if(StringUtil.isEmpty(inlayDiamondId))return;
	    clientorderdetailService.updateBySQL("update clientorderdetail set state=1 where inlay_diamond_id="+inlayDiamondId);
		
	}
	
}
